{% extends "base.html" %}
<!--signup.html-->
{% load i18n %}
{% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %}

{% block content %}
<div id="main-bar" class="">
    <h3 >{% trans "Signup" %}</h3>

</div>
<div class="jointxt">
    <p>{% trans "We support two types of user registration: conventional username/password, and" %} <a href="{% url user_signin %}">{% trans "the OpenID method" %}</a>.</p>

    {% if form.errors %}
    
    <p class="errors">
        <span class="big">{% trans "Sorry, looks like we have some errors" %}</span><br>
        <ul class="error-list">
        {% if form.username.errors %} 
        <li><span class="error">{{ form.username.errors|join:", " }}</span></li>
        {% endif %}
        {% if form.email.errors %} 
        <li><span class="error">{{ form.email.errors|join:", " }}</span></li>
        {% endif %}
        {% if form.password2.errors %} 
        <li><span class="error">{{ form.password2.errors|join:", " }}
        </span></li>
        {% endif %}
        </ul>
    </p>
    {% endif %}
</div>
    <form action="{% url user_signup %}" method="post" accept-charset="utf-8">
        <fieldset class="fieldset">
        <legend class="big">{% trans "Conventional registration" %}</legend>	
            <div class="form-row"><label for="id_username">{% trans "choose a user name" %}:</label><br>{{ form.username }}</div>

            <div class="form-row"><label for="id_email">{% trans "your email address" %}:</label><br>{{ form.email }}</div>
            <div class="form-row"><label for="id_password1">{% trans "choose password" %}:</label><br />{{ form.password1 }}</div>
            <div class="form-row"><label for="id_password2">{% trans "retype password" %}:</label><br>{{ form.password2 }}</div>
            <div class="submit-row"><input type="submit" class="submit" value="{% trans "login" %}" > 
			<a href="{% url user_signin %}">{% trans "back to login" %}</a></div>
        </fieldset>
            <br >
    </form>
    <br >
    <div style="display:none">
    <h2 class="signup">{% trans "Register with your OpenID" %}</h2>
    <form name="fopenid" action="{% url user_signin %}" method="post">
        <div class="form-row">{{ form2.openid_url }}</div>
        <div class="submit-row "><input name="bsignin" class="submit" type="submit" value="{% trans "Login with your OpenID" %}"></div>
    </form>
    </div>
{% endblock %}
<!--end signup.html-->
